package org.mathcloud.math.core.generic.operator.trigonometry;

import org.mathcloud.math.core.common.operator.trigonometry.Tan;
import org.mathcloud.math.core.common.quantity.RealNumber;
import org.mathcloud.math.core.generic.operator.GenericUnaryOperator;
import org.mathcloud.math.core.generic.quantity.GenericRealNumber;

public class GenericTan extends GenericUnaryOperator implements Tan
{
	public GenericTan()
	{
		super();
		signature.setMMLContentTag("tan");
	}

	@Override
	public void calculate()
	{
		if (operand.getSignature().isRealNumberSignature())
			res = new GenericRealNumber(Math.tan(((RealNumber)operand).getValue()));
	}
}
